package krt.wid.gslzs.activity;

import android.content.Intent;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;

import krt.wid.gslzs.R;
import krt.wid.gslzs.base.BaseActivity;
import krt.wid.gslzs.util.TitleManager;

/**
 *
 * @author admin
 * @date 2018/5/8
 * 用户注册页面
 */

public class RegisterActivity extends BaseActivity implements View.OnClickListener{
    FrameLayout leftLayout;
    ImageView p1;
    ImageView p2;
    int biaoshi;
    @Override
    public int bindLayout() {
        return R.layout.register;
    }

    @Override
    public void initView() {
        //设置标题
        TitleManager titleManager = new TitleManager(this);
        titleManager.hideDivider();
        titleManager.setCenterText("用户注册", ContextCompat.getColor(this, R.color.white), 18);

        leftLayout=findViewById(R.id.left_layout);
        leftLayout.setOnClickListener(this);

        //企业用户
        p1=findViewById(R.id.qyyh_register);
        //商协会用户
        p2=findViewById(R.id.sxhyh_register);
        p1.setOnClickListener(this);
        p2.setOnClickListener(this);

    }

    @Override
    public void loadData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.left_layout:
               finish();
               overridePendingTransition(R.anim.in2, R.anim.out2);
               break;

            case R.id.qyyh_register:
                biaoshi=1;
                 startActivity(new Intent(RegisterActivity.this,Qyyh_RegisterActivity.class).putExtra("biaoshi",biaoshi));
                break;

             case R.id.sxhyh_register:
                 biaoshi=2;
                 startActivity(new Intent(RegisterActivity.this,Qyyh_RegisterActivity.class).putExtra("biaoshi",biaoshi));
                break;


            default:
                break;
        }

    }
}
